#include <iostream>
#include <string>
#include <vector>

#include "medved/functor.hpp"
#include "medved/typelist.hpp"
#include "medved/scheduler.hpp"
#include "medved/manager.hpp"

using namespace Medved;

typedef Singleton<Scheduler> TheScheduler;

class A : public Managed
{
public:
	A(int val) : value(val) {}
	int value;
};

int main()
{
	using namespace std;
	
	vector<A> vec;
	
	vec.push_back(0);
	vec.push_back(1);
	vec.push_back(2);
	vec.push_back(3);
	vec.push_back(4);
	
	for (int i = 0; i < 5; ++i)
		cout << "vec[" << i << "].id  == " << vec[i].getId() << "\n";
	vec.erase(vec.begin());
	for (int i = 0; i < 5; ++i)
		cout << "vec[" << i << "].id  == " << vec[i].getId() << "\n";
	A *aa = static_cast<A*>(TheManager::instance().get(0));
	cout << "got: " << aa << "\n";
	cout << "=============\n";
}

